(defun mysql-command()
  (interactive)
  (insert "sudo ./mysqld_safe
mysqladmin -u root -p '123456'
mysql -u root -p
")
  )


(defun bash-if()
  (interactive)
  (insert "#!/bin/sh
# -f -- if file exists
# -d -- if target is dir

if [ -f /bin/bash ]
then
echo \"file /bin/bash exists\"
else
echo \"file /bin/bash exists\"
fi")
  )

(defun bash-for()
  (interactive)
  (insert "#!/bin/sh
for file in $(ls f*.sh); do
lpr $file
done
exit 0")
  )

(defun bash-until()
  (interactive)
  (insert "until # condition
do
#statements
done")
  )

(defun bash-while()
  (interactive)
  (insert "#!/bin/sh
foo=1
while [ \"$foo\" -le 20 ]
do
echo \"Here we go again\"
foo=$(($foo+1))
done
exit 0")
  )